package com.project.gcsj5.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.gcsj5.mapper.userMapper;
import com.project.gcsj5.model.User;
import com.project.gcsj5.service.userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class userServiceImpl extends ServiceImpl<userMapper, User> implements userService {
    @Autowired
    private userMapper userMapper;

    @Override
    public boolean login(int id, String password) {
        return userMapper.login(id,password)>0;
    }

    @Override
    public User getUserByName(String name) {
        return userMapper.getUserByName(name);
    }

    @Override
    public List<User> getUserByName_true(String name) {
        return userMapper.getUserByName_true(name);
    }
}
